<div class="row">
  <div class="col-md-12">
    <app-navigationadmin></app-navigationadmin>
  </div>
</div>

<button class="btn btn-primary" (click)="add()">添加</button>
<table class="table">
  <thead>
  <tr>
    <th scope="col">#</th>
    <th scope="col">标题</th>
    <th scope="col">描述</th>
    <th scope="col">作者</th>
    <th scope="col">时间</th>
    <th scope="col">图片</th>
  </tr>
  </thead>
  <tbody>
  <tr *ngFor="let s of sl ;index as i">
    <th scope="row" >{{i+1}}</th>
    <td>{{s.title}}</td>
    <td>{{s.describe}}</td>
    <td>{{s.author}}</td>
    <td>{{s.pbdate  | date:'yyyy-MM-dd HH:mm'}}</td>
    <td>
      <img src="{{s.cover}}" width="100px" height="100px">
    </td>

    <td>
      <button class="btn btn-success" (click)="update(s.singlepageid)">修改</button>
      <button class="btn btn-danger" (click)="delete(s.singlepageid)">删除</button>

    </td>
  </tr>

  </tbody>
</table>
